home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / docs / howto / server-info / oregano.debug.me < prev   
Encoding:
Text File  |  1992-12-14  |  5.1 KB  |  154 lines

  1. .uh "How to Boot Oregano"
  2. .pp
  3. I am ``Oregano'', A Sprite file server.
  4. Oregano only boots over the network from Mint:
  5. .(l
  6. >b ie(0,9634)sun3.md/new
  7. .)l
  8. Oregano is also configured to boot as a backup root server in
  9. case of dire emergency.  In this case you have to boot it from ginger
  10. with a flag telling it to be the root server.  This is useful if
  11. Mint is so messed up it can't get through its boot sequence.
  12. .(l
  13. >b ie(0,961c,43)sun3.new -x
  14. .)l
  15. If you boot Oregano as the root server, you can boot Mint as
  16. a client by passing it the '-c' flag on its boot command line.
  17. .pp
  18. To reboot when running Sprite, use the shutdown command:
  19. .(l
  20. % sync
  21. % shutdown -R 'ie(0,9634)sun3.md/new'
  22. .)l
  23. The 'sync' command writes out the cache, is isn't required unless
  24. you are parnoid.  Shutdown will sync the disks as the last thing before
  25. rebooting.
  26. .pp
  27. If Oregano is so hung you can't reboot with user commands,
  28. then the best you can do is sync the disks with:
  29. .(l
  30. L1-W
  31. .)l
  32. This should print a message about queuing a call to sync the disks,
  33. and when it is done it should print a '.' and a newline.
  34. If you don't get the newline then Oregano is deadlocked inside the
  35. file system cache, sigh.
  36. .br
  37. And then abort it to the PROM monitor with
  38. .(l
  39. L1-A
  40. .)l
  41. Then reboot it as described above.
  42.  
  43. .uh "Debugging Tips"
  44. .pp
  45. If Oregano acts up then you might try the following things.
  46. If you aren't logged in, log in as root.
  47. Useful commands are:
  48. .(l
  49. oregano # rpcstat -srvr
  50. .)l
  51. Which dumps out the status of all the RPC server processes.  If a bunch
  52. are ``busy'', and they remain busy with the same RPC ID and client, then
  53. there may be a deadlock.
  54. If they are all in the ``wait'' state it means that the Rpc_Daemon process
  55. is not doing rebinding for some reason.
  56. .(l
  57. oregano # ps -a
  58. .)l
  59. This will tell you if any important daemons have died.
  60. If the ipServer is in the DEBUG state you can kill it and
  61. the daemons that depend on it with /hosts/oregano/fixIPServer.
  62. This should also restart these daemons, but if it doesn't you
  63. can use /hosts/oregano/restartservers.
  64. .(l
  65. % rpcecho -h \fIhostname\fP -n 1000
  66. .)l
  67. This program, which is found in /sprite/src/benchmarks/rpcecho,
  68. and may or may not be installed in /sprite/cmds,
  69. will tell you if there timeouts when using the RPC protocol to
  70. talk to another host.  If you suspect that a host with an Intel
  71. ethernet interface is flaking out, you can try this command.
  72. Lot's of timeouts indicate trouble.
  73. You can reset a host's network interface from its console with
  74. either of these keystrokes.
  75. .(l
  76. break-N
  77. Ll-N
  78. .)l
  79. On a regular Sun keyboard you use the L1 key like a shift key.
  80. On a regular ascii terminal, like Mint's console, you use the
  81. break key like escape - break then N.
  82. .uh "Kernel Debugging"
  83. .pp
  84. If Oregano is so hung you can't explore with user commands,
  85. then the best you can do is sync the disks with:
  86. .(l
  87. L1-W
  88. .)l
  89. And then throw Oregano into the debugger with:
  90. .(l
  91. L1-D
  92. .)l
  93. If this drops you into the monitor (the '>' prompt), you can
  94. still get into the debugger by typing 'c' to the monitor.
  95. You may have to do this twice.  You should eventually get
  96. a message about ``Entering the debugger...''.
  97. .pp
  98. You have to run the debugger from Rosemary, unless there is a stand-alone
  99. Sprite machine available.  You can use dill, the ds3100 in the next
  100. room, to rlogin to rosemary.
  101. You should verify that Oregano is accessible by running
  102. .(l
  103. ginger% kmsg -v oregano
  104. .)l
  105. This should return the kernel version that Oregano is running.
  106. If this times-out then either Oregano isn't in the debugger,
  107. or more likely, no one is responding to ARP requests for Oregano's
  108. IP address.  Run the setup-arp script that is in ~sprite bin:
  109. .(l
  110. ginger% setup-arp
  111. .)l
  112. Now rlogin to Rosemary and run the Sprite kernel debugger.
  113. The kernel images should be copied to rosemary:/tmp/sprite
  114. or rosemary:/tmp/brent, and their version number should be
  115. evident in their name, i.e. sun3.1.040.  If not, you can run
  116. strings on the kernel images and grep for ``VERSION''.
  117. .(l
  118. rosemary% strings /tmp/sprite/sun3.sprite | egrep VERSION
  119. .)l
  120. To run the kernel debugger:
  121. .(l
  122. rosemary% cd /sprite3/src/kernel/sprite
  123. rosemary% kgdb.sun3 /tmp/sprite/sun3.\fIversion\fP
  124. .)l
  125. If the RPC system seems to be the problem, you can dump the
  126. trace of recent RPCs by calling Rpc_PrintTrace(numRecs)
  127. .(l
  128. (kgdb) print Rpc_PrintTrace(50)
  129. .)l
  130. If there is a deadlock you can dump the process table:
  131. .(l
  132. (kgdb) print Proc_Dump()
  133. .)l
  134. You can switch from process to process and to stack backtraces
  135. by using the 'pid' command.  You only need to specify the last
  136. two hex digits of the process ID.  If you only have a decimal ID,
  137. then you have to type the whole thing.
  138. File system deadlocks center around locked handles, usually.
  139. When you find a process stuck in Fsutil_HandleFetch of Fsutil_HandleLock
  140. you can try to find the culprit by looking at the *hdrPtr these
  141. guys are waiting on.  There is a 'lockProcessID' in the hdrPtr that
  142. is really the address of a Proc_ControlBlock.  You can print this out
  143. with something like:
  144. .(l
  145. (kgdb) print *(Proc_ControlBlock *)(hdrPtr->lockProcessID)
  146. .)l
  147. You can reboot Oregano from within kgdb with the reboot command.
  148. .(l
  149. (kgdb) reboot ie(0,9634)sun3.md/new
  150. .)l
  151. .uh "Modify date"
  152. .pp
  153. These notes were last updated by Brent Welch on \*(td.
  154.